prepare("select * from lockme") ; $lock->execute() ; $drow = $lock->fetch(pdo::FETCH_ASSOC) ; $lc = $drow['value'] ; if($lc == 'LOCK') { $msg[] = "Sorry, Results are not yet ready, Check Back Later" ; } else { $pins = trim($_POST['pin']); $regno = trim($_POST['regno']); $classid = trim($_POST['classid']); $sql = $DBcon->prepare("SELECT * FROM pins WHERE pin = :p"); $sql->bindparam(':p', $pins); $sql->execute(); $rc = $sql->rowcount(); if($rc > 0) { $_SESSION["rgno"] = $regno; $_SESSION["pin"] = $pins; $_SESSION["classid"] = $classid; $sql1 = $DBcon->prepare("SELECT * FROM pinassociate WHERE PINCODE = :ps"); $sql1->bindparam(':ps', $pins); $sql1->execute(); $rct = $sql1->rowcount(); if($rct > 0) { $row = $sql1->fetch(PDO::FETCH_ASSOC); $pin = $row['PINCODE']; $owner = $row['REGNO']; $numbused = $row['NOUSED']; if(($owner == $regno) && ($numbused >= 4)) { $msg[] = 'You have used this Pin above its Limit please buy another Card'; } if ($owner != $regno) { $msg[] = 'THIS CARD HAS BEEN USED BY ANOTHER PERSON'; } } } else { $msg[] = 'Sorry the Pin you entered does not exist, Check the Pin and try again'; } if(empty($msg)) { header("location: rs.php"); exit(); } } } ?>
Enter your surname below and click "Find RegNo" to search for your registration number: